package com.correo.vista.client.windows.event;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.beans.PropertyVetoException;

import com.correo.vista.client.windows.Correo;

public class ActionListenerCerrarVentana implements ActionListener{

	private Correo correo;
	public ActionListenerCerrarVentana(Correo correo){
		this.correo = correo;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		try {
			System.out.println("Cerrando ventana interna .......");
			correo.getPanelPrincipal().getSelectedFrame().setClosed(true);
		} catch (PropertyVetoException e1) {
			// TODO Auto-generated catch block
			e1.printStackTrace();
		}
		
	}

}
